#ifndef MAINFRAME_H
#define MAINFRAME_H

#include <QWidget>
#include "capture.h"
#include <iostream>

namespace Ui {
class MainFrame;
}

class MainFrame : public QWidget
{
    //用于处理类的槽和信号的作用
    Q_OBJECT

public:
    explicit MainFrame(QWidget *parent = 0);
    ~MainFrame();

private slots:
    void on_btStart_clicked();
    void on_btSop_clicked();
    //English:used for recv the signal :sendMat(cv::Mat) and show the cv::Mat variable
    //Chinese:( Encode UTF-8)用于接收 sendMat(cv::Mat)信号的槽函数
    void showMat (cv::Mat);
private:
    Ui::MainFrame *ui;
    //Functions
    bool initCaptureLib ();
    bool closeCaptureLib ();

    //Variables
    bool bInitSuccess;

    //Classes
    Capture     *cap;
};

#endif // MAINFRAME_H
